Skip to content

Player order for games that read every controller - #37

Merged
narkotrxll merged 1 commit into
mainfrom
feature/player-order
Oct 16, 2026
Merged

narkotrxll merged 1 commit into
mainfrom
feature/player-order

Conversation

@narkotrxll

@narkotrxll narkotrxll commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Before: in local co-op games the controllers got the player numbers Windows gave them, so "player 2 controls player 1" could only be fixed by reconnecting controllers in the right order.

After: Controllers → "Sticks, triggers and buttons" → "Player order" picks which slot plays as player 1, 2, 3 and 4. It applies to games that read every controller (no single controller chosen for the game). Picking a slot that another player had swaps the two.

How: gamepadTuning.playerOrder (defaults to Windows' order). It travels in the existing tuning message, whose spare bytes now carry playerSlots (hook protocol 5, same size). Without slot lock, the hook's MapUserIndex maps the game's user index through that order; keystrokes report the index the game asked for. Not yet tried on real Windows.

Controllers -> 'Player order' picks which slot plays as player 1-4 in games that
read every controller (no controller chosen for the game), for local co-op where
Windows numbered the controllers differently. Sent with the tuning message (hook
protocol 5); the hook remaps the game's XInput user indexes.
@narkotrxll
narkotrxll merged commit 1b13527 into main Oct 16, 2026
3 checks passed
@narkotrxll
narkotrxll deleted the feature/player-order branch October 16, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant